export default {
	props: {
		value: { type: Boolean, default: false }
	},
	data() {
		let checkedItem = this.$local.get('conversationIdInfo');
		return {
			isNewChat: !!checkedItem,
			isExpand: this.value,
			workflows: [],
			checkedItem
		}
	},
	watch: {
		value(flag) {
			this.isExpand = flag;
		},
		isExpand(flag) {
			this.$emit('input', flag);
		}
	},
	methods: {
		handleAddedChat() {
			this.workflows.unshift({ created_by_end_user: { session_id: '新建会话' } });
		},
		handleChatAside() {
			this.isExpand = !this.isExpand;
		}
	}
}